|
A one-liner is textual input to the command-line of an operating system shell that performs some function in just one line of input. The one-liner can be # An expression written in the language of the shell. # The invocation of an interpreter together with program source for the interpreter to run. # The invocation of a compiler together with source to compile and instructions for executing the compiled program. Certain dynamic scripting languages such as AWK, sed, and Perl have traditionally been adept at expressing one-liners. Specialist shell interpreters such as these Unix shells or Windows PowerShell, allow for the construction of powerful one-liners. The use of the phrase one-liner has been widened to also include program-source for any language that does something useful in one line. == History == The word ''One-liner'' has two references in the index of the book (The AWK Programming Language ) (the book is often referred to by the abbreviation ''TAPL''). It explains the programming language AWK, which is part of the Unix operating system. The authors explain the birth of the ''one-liner'' paradigm with their daily work on early Unix machines: Notice that this original definition of a ''one-liner'' implies immediate execution of the program without any compilation. So, in a strict sense, only source code for interpreted languages qualifies as a ''one-liner''. But this strict understanding of a ''one-liner'' was broadened in 1985 when the IOCCC introduced the category of ''Best One Liner'' for C, which is a compiled language. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「One-liner program」の詳細全文を読む スポンサード リンク
|